//---------------------------------------------------------------------------
#ifndef TD_MainH
#define TD_MainH
//---------------------------------------------------------------------------

#include "Globals.h"

#include <Forms.hpp>

#include <Classes.hpp>
#include <ComCtrls.hpp>
#include <Controls.hpp>
#include <Dialogs.hpp>
#include <ExtCtrls.hpp>
#include <Menus.hpp>
#include <StdCtrls.hpp>


//---------------------------------------------------------------------------
class TmyForm : public TForm
{
__published:	// IDE-managed Components
  TPaintBox *Video;
  TMainMenu *MainMenu1;
  TMenuItem *File1;
  TMenuItem *OpenBinaryTextData1;
  TMenuItem *N1;
  TMenuItem *SaveTextFile1;
  TMenuItem *Exit1;
  TOpenDialog *Open1;
  TMenuItem *LoadDataFile;
  TStatusBar *StatusBar1;
  TMenuItem *N2;
  TFindDialog *Find1;
  TMenuItem *View1;
  TMenuItem *DisplayTextEditor1;
  TMenuItem *N3;
  TMenuItem *HideCodes;
  TMenuItem *UseVWFRoutine1;
  TMenuItem *DTT;
  TMenuItem *N4;
  TMenuItem *ViewHexData1;
  TMenuItem *DecompresstoFiles1;
  TMenuItem *Window1;
  TMenuItem *DumpMemory1;
  TSaveDialog *FSave;

  TMenuItem *TextboxColor1;
  TMenuItem *Blue1;
  TMenuItem *Green1;
  TMenuItem *Red1;
  TMenuItem *N5;
  TMenuItem *Solid1;
  TMenuItem *Gradient1;

  TMenuItem *N6;
  TMenuItem *TEOnTop;
  TMenuItem *DisplayKanaTextDump1;
  TMenuItem *Program1;
  TMenuItem *Zoominx21;
  TMenuItem *DefaultWindowSize1;
 TMenuItem *SaveRomFile1;
  TMenuItem *Help1;
  TMenuItem *EditorKeys1;
  void __fastcall OpenBinaryTextData1Click(TObject *Sender);
  void __fastcall SaveTextFile1Click(TObject *Sender);
  void __fastcall Exit1Click(TObject *Sender);
  void __fastcall LoadDataFileClick(TObject *Sender);
  void __fastcall FormCreate(TObject *Sender);
  void __fastcall FormClose(TObject *Sender, TCloseAction &Action);

  void __fastcall VideoPaint(TObject *Sender);
  void __fastcall pListClick(TObject *Sender);
  void __fastcall bListClick(TObject *Sender);
  void __fastcall Find1Find(TObject *Sender);
  void __fastcall DisplayTextEditor1Click(TObject *Sender);

  void __fastcall HideCodesClick(TObject *Sender);
  void __fastcall UseVWFRoutine1Click(TObject *Sender);
  void __fastcall DTTClick(TObject *Sender);
  void __fastcall FormResize(TObject *Sender);
  void __fastcall ViewHexData1Click(TObject *Sender);

  void __fastcall DecompresstoFiles1Click(TObject *Sender);
  void __fastcall DumpMemory1Click(TObject *Sender);
  void __fastcall Red1Click(TObject *Sender);
  void __fastcall TEOnTopClick(TObject *Sender);
  void __fastcall DefaultWindowSize1Click(TObject *Sender);

  void __fastcall Zoominx21Click(TObject *Sender);
  void __fastcall DisplayKanaTextDump1Click(TObject *Sender);
  void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
 void __fastcall SaveRomFile1Click(TObject *Sender);
  
  void __fastcall EditorKeys1Click(TObject *Sender);
private:	// User declarations
public:		// User declarations
  __fastcall TmyForm(TComponent* Owner);

  void __fastcall DrawText( int  skip, int height, int width );
  long __fastcall GetCurLine( long valu );
  long __fastcall GetTextPointers( LONG lpCurPosi );
  long __fastcall Decompress( LONG lpOffset );
};

//---------------------------------------------------------------------------
extern PACKAGE TmyForm *myForm;
//---------------------------------------------------------------------------
#endif
  